package com.douxg.fastCoding.randomData;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Random;

/**
 * @Description
 * @Auther douxg
 * @Date 2020/11/12 13:04
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class IntRandomData implements RandomData<Integer> {
    private int start=1;
    private int end = 10000;

    @Override
    public Integer create() {
        return new Random().nextInt(end + 1 - start) + start;
    }
}
